feat: add Amazon Textract integration (#2391)#3148
Open
zafatar wants to merge 7 commits intodeepset-ai:mainfrom
Open
feat: add Amazon Textract integration (#2391)#3148zafatar wants to merge 7 commits intodeepset-ai:mainfrom
zafatar wants to merge 7 commits intodeepset-ai:mainfrom
Conversation
Add AmazonTextractConverter component that extracts text from images and single-page PDFs using the AWS Textract synchronous API. Supports both DetectDocumentText (plain OCR) and AnalyzeDocument (tables, forms, signatures, layout) as well as natural-language queries. Includes CI workflow, unit/integration tests, pydoc config, and repo-level wiring (labeler, coverage comment, README).
bogdankostic
requested changes
Apr 14, 2026
Contributor
bogdankostic
left a comment
There was a problem hiding this comment.
Thanks for your PR @zafatar! It looks already good to me, I just left a few minor comments on how it can be further improved.
| When provided, the Textract ``QUERIES`` feature type is enabled | ||
| automatically and each question is sent as a query. Answers are | ||
| included in the raw Textract response. Example: | ||
| ``["What is the patient name?", "What is the total due?"]`` |
Contributor
There was a problem hiding this comment.
Let's use single backticks here.
Suggested change
| ``["What is the patient name?", "What is the total due?"]`` | |
| `["What is the patient name?", "What is the total due?"]` |
Contributor
There was a problem hiding this comment.
This file will be generated automatically once we do the release, so we can remove it here.
Contributor
There was a problem hiding this comment.
Let's add some checks that warning messages are raised for cases that go wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add AmazonTextractConverter component that extracts text from images and single-page PDFs using the AWS Textract synchronous API. Supports both DetectDocumentText (plain OCR) and AnalyzeDocument (tables, forms, signatures, layout) as well as natural-language queries. Includes CI workflow, unit/integration tests, pydoc config, and repo-level wiring (labeler, coverage comment, README).
Related Issues
Proposed Changes:
Similar to the other converter tools such as Azure Document Intelligence or other Amazon resources such as Amazon Bedrock, it covers the access to the
Amazon Textractby using boto3 and AWS credentials from the environment variables.How did you test it?
The tests are run as two separate groups:
Notes for the reviewer
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.